package com.open.cloud.rbac.mapper.orgpost;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.cloud.rbac.entity.orgpost.CoreOrganization;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 组织架构 Mapper 接口
 * </p>
 *
 * @author wangzengzhou01
 * @since 2024-12-23
 */
@Mapper
public interface CoreOrganizationMapper extends BaseMapper<CoreOrganization> {

    /**
     * 根据公司Id查询组织Ids
     *
     * @param companyId
     * @return
     */
    public List<String> selectOrgIds(@Param("companyId") String companyId);

    /**
     * 根据父级查询所有子级组织Id
     *
     * @param parentId
     * @return
     */
    public List<String> selectOrgIdsByParentId(@Param("parentId") String parentId);

}
